Enabling dynamic cache service
The dynamic cache service is an in-memory cache system that has disk off-load capability. Its caching behavior is defined in an XML file named cachespec.xml. The cache policy is configured when building the XML configuration files. A graphical user interface (GUI) tool for building the cache policy files is available at
http://www.alphaworks.ibm.com/tech/cachepolicyeditorfor use with WebSphere V5.1.0 Service Pack 3 and above.
Unique ID strings distinguish unique entries in WAS's dynamic content caching solution. These ID strings can be defined declaratively with the XML configuration file or programmatically by the user's Java program. Please refer to the WebSphere InfoCenter for more information on this.
WAS dynamic cache service can control external caches. Different groups of external caches can be defined, each with its own set of member caches. The interface between WAS and the external cache is the External Cache Adapter provided by WAS. We elaborate more on this topic in WebSphere external caching scenarios.
The dynamic cache service includes an alternative feature named disk off-load, which stores the overflow cache entries on disk for potential future access. This feature removes the dynamic cache memory constraints experienced in previous WAS versions.
To enable dynamic caching for an appserver, follow these steps:
1. Open the Administrative Console. 2. Click Servers -> Application Servers in the navigation tree. 3. Select your appserver. 4. Select Dynamic Cache Service from the Additional Properties. 5. Select Enable service at server startup in the Startup state field. 6. Click Apply or OK. All changes made to the dynamic cache service properties take effect after restarting the server.
Figure 14-13 shows the configuration panel of the dynamic cache service in the Administrative Console.
Figure 14-13 Enabling dynamic caching in Administrative Console
As was mentioned before, the WAS uses JVM memory to store cached objects. Therefore it is important to know how much memory can be allocated for the cache and based on this information you can set the cache size to the proper value. You need to be able to estimate the total size of objects which can be cached during peak hours. For example, you could use Page Detailer to analyze the size of generated pages. Also, your application designer needs to understand the performance implication of heavy pages.
If the estimated total size of all cached objects is bigger than the available memory, you can enable the disk off-load option. You then need to configure priorities for the cached objects in the cachespec.xml file. Priority weighting is used in conjunction with the least recently used (LRU) algorithm. Based on this algorithm it is decided which entries are moved from memory to disk if the cache runs out of storage space.
If you decide to use the disk off load option, you need to also configure your file system for fast I/O access. Depending on your hardware and software you can use various disk striping or caching techniques.
An additional feature of the dynamic cache services is cache replication. You can enable cache replication using the same configuration panel. Cache replication leverages the WebSphere internal replication service (DRS) that is also used for HTTP session memory-to-memory replication. A replication domain with at least one replicator entry needs to exist in order to replicate the data. The dynamic cache, in essence, connects to the replicator. We discuss cache replication further in 14.3.3, Cache replication.
Prev | Home | Next WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.